package com.travel.server.manager.impl.controller.base;

import com.travel.server.manager.impl.command.AbstractCommand;

/**
 * @Author: LiZhenhui
 * @Date: 2018/10/17 18:02
 * @Desc:
 */
public abstract class AbstractController {

    private static ThreadLocal<AbstractCommand> tl = new ThreadLocal<>();

    /**
     * 获取方法类
     * @return
     */
    public AbstractCommand getCommand() {
        return tl.get();
    }

    /**
     * 设置方法类
     * @param command
     */
    public void setCommand(AbstractCommand command) {
        tl.set(command);
    }
}
